import React, { FC } from 'react';
import { AppRouter } from './router';
import {
  CityStoreContextProvider,
  useCityStoreProvide,

  FieldStoreContextProvider,
  useFieldStoreProvide,

  LoginUserContextProvider
} from '@/store';

const App: FC = () => {
  const cityStoreProvide = useCityStoreProvide();
  const fieldStoreProvide = useFieldStoreProvide();
  
  return (
    <LoginUserContextProvider>
      <CityStoreContextProvider {...cityStoreProvide}>
        <FieldStoreContextProvider {...fieldStoreProvide}>
          <AppRouter />
        </FieldStoreContextProvider>
      </CityStoreContextProvider>
    </LoginUserContextProvider>
  );
}

export default App;
